using System;
using UnityEngine;

public static class ActiveButton
{
	public static void EnableButtonColor(this tk2dSprite sprite, bool enable)
	{
		if (sprite == null)
		{
			return;
		}
		sprite.color = ((!enable) ? ActiveButton.DEACTIVE : ActiveButton.ACTIVE);
		Collider component = sprite.GetComponent<Collider>();
		component.enabled = enable;
	}

	private static readonly Color ACTIVE = new Color(1f, 1f, 1f);

	private static readonly Color DEACTIVE = new Color(0.5f, 0.5f, 0.5f);
}
